import Vue from 'vue'
import Router from 'vue-router'
import Home from '../views/Home'
import Friends from '../views/Friends'
import Cart from '../views/Cart'
import Search from '../views/Search'
import NewsList from '../views/Home/news/NewsList'
import NewsInfo from '../views/Home/news/NewsInfo'
import PhotoList from '../views/Home/photos/PhotoList'
import PhotoInfo from '../views/Home/photos/PhotoInfo'
import GoodsList from '../views/Home/goods/GoodsList'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/home',
    component: Home
  },
  {
    path: '/home/newslist',
    component: NewsList
  },
  {
    path: '/home/newsinfo/:id',
    component: NewsInfo
  },
  {
    path: '/home/photolist',
    component: PhotoList
  },
  {
    path: '/home/photoinfo/:id',
    component: PhotoInfo
  },
  {
    path: '/home/goodslist',
    component: GoodsList
  },
  {
    path: '/Friends',
    component: Friends
  },
  {
    path: '/Cart',
    component: Cart
  },
  {
    path: '/Search',
    component: Search
  }
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
    // }
  ]
})
